<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\relation\HasOne;

/**
 * @mixin \think\Model
 */
class InvoiceDetails extends Model
{
    public function bh()
    {
        return $this->hasOne(Invoice::class,'id','invoice_id')->bind(['number']);
    }

    public function proceeds()
    {
        return $this->hasOne(ProceedsDetails::class,'invoice_details_id','id')->field('invoice_details_id,grandtotal');
    }

    public function class()
    {
        return $this->hasMany(ClassStudent::class,'invoice_details_id','id');
    }



}
